<?php
include("auth.php");
      
if ($_SESSION['AUTH_LEVEL'] < 2) {
			echo("Sie haben keine Rechte um neue Nutzer anzulegen");
} else {
	$rechte = '';
	for($i = 0; $i <= $_SESSION['AUTH_LEVEL']; $i++) {
			$rechte = $rechte."<option>".$i."</option>";
	}
	echo('
			<form>
			Nutzer hinzufuegen:
			<table>
				<tr>
				<td>
					    <input 
					    		  type        = "text" 
					    		  style       = "width:180px;" 
					    		  id            = "newUserName" 
					    		  value      = "Name" 
					    		  onfocus   ="this.value = \'\'; " 
					     />
					    <br />
					    <input 
					    		  type       = "text" 
					    		  style      = "width:180px;" 
					    		  id           = "newUserMail" 
					    		  value     = "Mailadresse" 
					    		  onfocus = "this.value = \'\'; "
					    />
			 </td>
			 <td>
					    <input 
					    		   type        ="password" 
					    		   style       ="width:180px;" 
					    		   id            ="newUserPass" 
					    		   value      ="xxxxxx"
					    		   onfocus   ="this.value = \'\'; "
					    		    />
					    <br />
					    <input
					    		  type          ="password" 
					    		  style         ="width:180px;" 
					    		  id              ="newUserPassConfirm"
					    		  value        ="yyyyyy" 
					    		  onfocus   ="this.value = \'\'; " 
					    />
					    <br />
		    </td>
	</tr>
	</table>
	<table>
	<tr>
		<td>
		Status:
		</td>
		<td>
		Rechte:
		</td>
	</tr>
	<tr>
		<td>
		<select style="width:50px; height:20px; margin-top:2px; float:left;" id="newUserState" > <option> FX</option><option> AB</option><option> iAB</option><option> AH</option></select>
		</td>
		<td>
		<select style="width:50px; height:20px; margin-top:2px; float:left;" id="newUserRights" > '.$rechte.'</select>
		</td>
	</tr>
	</table>
    <input type="submit" value="Hinzufügen" onclick="addUser();" style="margin-top:4px;float:right" />
    </form>
				'); // end echo
} // end security check
?>